<template>
	<u-sticky offset-top="0">
		<view class="top" :style="{height:statusBarHeight+'px'}"></view>
		<view class="top" :style="{height:titleBarHeight+'px'}">
			<view class="flex">
				<view style="width: 33.33%;" class="left"><view style="padding-left: 10px;">
				<slot></slot>
				</view></view>
				<view style="width: 33.33%;" class="title_top">{{title}}</view>
				<view style="width: 33.33%;"></view>
			</view>
		</view>
	</u-sticky>

</template>

<script>
	import {
		getNavigationBarHeight,
		getTitleBarHeight
	} from '@/utils/system.js';
	export default {
		name: "systemH",
		props:{
			title:{}
		},
		data() {
			return {
				statusBarHeight: '',
				titleBarHeight: ''
			};
		},
		methods: {
			rightClick() {}
		},
		mounted() {
			this.statusBarHeight = getNavigationBarHeight()
			this.titleBarHeight = getTitleBarHeight()
		}
	}
</script>

<style lang="scss">
	.top {
		background-color: #44af85;
	}
	.flex {
		height: 100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.left {
			
		}
		.title_top {
			color: #fff;
			font-size: 30rpx;
			text-align: center;
		}
	}
</style>